package com.spzx.product.api.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {
    @Schema(description = "商品分类名称")
    private String name;
    @Schema(description = "商品分类图标路径")
    private String imageUrl;
    @Schema(description = "上级分类id")
    private Long parentId;
    @Schema(description = "是否显示[0-不显示，1显示]")
    private Integer status;
    @Schema(description = "排序")
    private Integer orderNum;
    @TableField(exist = false)
    @Schema(description = "是否有子节点")
    @ExcelIgnore
    private Boolean hasChildren;
    @ExcelIgnore
    @TableField(exist = false)
    @Schema(description = "子节点")
    private List<Category> children;
}